const dictionaryConfig = {
  // 组合管理-杠杆率分析-杠杆率明细上限值
  leverageUpperLimit: {
    cashManage: 120, // 现金管理类
    openPublicOffering: 140, // 开放式公募
    closedAndOthers: 200, // 封闭式及其他
  },
  // 交易所协议式回购报价类型
  exchange: {
    // 上交所报价类型
    shanghaiExchange: [
      {
        value: '1',
        title: '协议回购成交申报',
        agreeCode: false, // 约定号是否必填
        orderSide: '融资回购', // 默认委托方向
        modifyOrderSide: false, // 是否可以修改委托方向
        requiredOldPledgeBond: false, // 原质押券是否必填
        calculation: true, // 是否自定计算  到期结算日、实际占款天数
      },
      { value: '2', title: '协议回购到期续做申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
      { value: '3', title: '协议回购解除质押申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
      { value: '4', title: '协议回购换券申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: true, calculation: true },
      { value: '5', title: '协议回购提前终止申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: true, requiredOldPledgeBond: false, calculation: true },
      { value: '6', title: '协议回购成交申报确认', agreeCode: true, orderSide: '融券回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
      { value: '7', title: '协议回购到期续做申报确认', agreeCode: true, orderSide: '融券回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
      { value: '8', title: '协议回购解除质押申报确认', agreeCode: true, orderSide: '融券回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
      { value: '9', title: '协议回购换券申报确认', agreeCode: true, orderSide: '融券回购', modifyOrderSide: false, requiredOldPledgeBond: true, calculation: true },
      { value: '10', title: '协议回购提前终止申报确认', agreeCode: true, orderSide: '融券回购', modifyOrderSide: true, requiredOldPledgeBond: false, calculation: true },
      { value: '11', title: '协议回购到期确认申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
    ],
    // 可选报价类型控制
    optionalQuotationType: {
      0: [{ value: '1', title: '协议回购成交申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true }],
      1: [
        { value: '2', title: '协议回购到期续做申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
        { value: '11', title: '协议回购到期确认申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
      ],
      2: [
        { value: '3', title: '协议回购解除质押申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
        { value: '4', title: '协议回购换券申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: true, calculation: true },
        { value: '5', title: '协议回购提前终止申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: true, requiredOldPledgeBond: false, calculation: true },
      ],
      3: [{ value: '2', title: '协议回购到期续做申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true }],
      4: [
        {
          value: '1',
          title: '协议回购成交申报',
          agreeCode: false, // 约定号是否必填
          orderSide: '融资回购', // 默认委托方向
          modifyOrderSide: false, // 是否可以修改委托方向
          requiredOldPledgeBond: false, // 原质押券是否必填
          calculation: true, // 是否自定计算  到期结算日、实际占款天数
        },
        { value: '2', title: '协议回购到期续做申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
        { value: '3', title: '协议回购解除质押申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
        { value: '4', title: '协议回购换券申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: true, calculation: true },
        { value: '5', title: '协议回购提前终止申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: true, requiredOldPledgeBond: false, calculation: true },
        { value: '11', title: '协议回购到期确认申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
      ],
      5: [
        { value: '2', title: '协议回购到期续做申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
        { value: '3', title: '协议回购解除质押申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
        { value: '4', title: '协议回购换券申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: true, calculation: true },
        { value: '5', title: '协议回购提前终止申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: true, requiredOldPledgeBond: false, calculation: true },
        { value: '11', title: '协议回购到期确认申报', agreeCode: false, orderSide: '融资回购', modifyOrderSide: false, requiredOldPledgeBond: false, calculation: true },
      ],
    },

    // 可选报价类型可编辑字段
    disabledControl: [
      {
        value: '1',
        title: '协议回购成交申报',
        productId: false, // 产品
        portfolioId: false, // 组合
        exchange: false, // 交易所
        quotationType: false, // 报价类型
        orderSide: false, // 委托方向，所有类型都可以修改
        agreementNumber: true, // 约定号
        repurchaseDays: false, // 回购期限
        repoRate: false, // 回购利率
        firstSettlemenDate: true, // 首期结算日
        // settlementDate:true,   //到期结算日，所有类型不可以修改
        // occupationDays:true,   //实际占款天数，所有类型不可修改
        counterParty: false, // 交易对手
        counterPartyCode: false, // 交易对手编号
        counterPartyper: false, // 对手交易员
        // creator:true,    //下达人，所有类型不可修改
        addPledge: false, // 新增质押券
        editPledge: false, // 编辑质押券
        deletePledge: false, // 删除质押券
        position: false, // 持仓可点回填
      },
      {
        value: '6',
        title: '协议回购成交申报确认',
        productId: false,
        portfolioId: false,
        exchange: false,
        quotationType: false,
        orderSide: false,
        agreementNumber: false,
        repurchaseDays: false,
        repoRate: false,
        firstSettlemenDate: true,
        counterParty: false,
        counterPartyCode: false,
        counterPartyper: false,
        addPledge: false,
        editPledge: false,
        deletePledge: false,
        position: false,
      },
      {
        value: '2',
        title: '协议回购到期续做申报',
        productId: true,
        portfolioId: true,
        exchange: true,
        quotationType: false,
        orderSide: true,
        agreementNumber: true,
        repurchaseDays: false,
        repoRate: false,
        firstSettlemenDate: true,
        counterParty: true,
        counterPartyCode: true,
        counterPartyper: true,
        addPledge: true,
        editPledge: false,
        deletePledge: true,
        position: true,
      },
      {
        value: '11',
        title: '协议回购到期确认申报',
        productId: true,
        portfolioId: true,
        exchange: true,
        quotationType: false,
        orderSide: true,
        agreementNumber: true,
        repurchaseDays: true,
        repoRate: true,
        firstSettlemenDate: true,
        counterParty: true,
        counterPartyCode: true,
        counterPartyper: true,
        addPledge: true,
        editPledge: true,
        deletePledge: true,
        position: true,
      },
      {
        value: '3',
        title: '协议回购解除质押申报',
        productId: true,
        portfolioId: true,
        exchange: true,
        quotationType: false,
        orderSide: true,
        agreementNumber: true,
        repurchaseDays: true,
        repoRate: true,
        firstSettlemenDate: true,
        counterParty: true,
        counterPartyCode: true,
        counterPartyper: true,
        addPledge: true,
        editPledge: true,
        deletePledge: true,
        position: true,
      },
      {
        value: '4',
        title: '协议回购换券申报',
        productId: true,
        portfolioId: true,
        exchange: true,
        quotationType: false,
        orderSide: true,
        agreementNumber: true,
        repurchaseDays: true,
        repoRate: true,
        firstSettlemenDate: true,
        counterParty: true,
        counterPartyCode: true,
        counterPartyper: true,
        addPledge: true,
        editPledge: false,
        deletePledge: true,
        position: true,
      },
      {
        value: '5',
        title: '协议回购提前终止申报',
        productId: true,
        portfolioId: true,
        exchange: true,
        quotationType: false,
        orderSide: true,
        agreementNumber: true,
        repurchaseDays: true,
        repoRate: true,
        firstSettlemenDate: true,
        counterParty: true,
        counterPartyCode: true,
        counterPartyper: true,
        addPledge: true,
        editPledge: true,
        deletePledge: true,
        position: true,
      },
      {
        value: '7',
        title: '协议回购到期续做申报确认',
        productId: true,
        portfolioId: true,
        exchange: true,
        quotationType: false,
        orderSide: true,
        agreementNumber: false,
        repurchaseDays: true,
        repoRate: true,
        firstSettlemenDate: true,
        counterParty: true,
        counterPartyCode: true,
        counterPartyper: true,
        addPledge: true,
        editPledge: true,
        deletePledge: true,
        position: true,
      },
      {
        value: '8',
        title: '协议回购解除质押申报确认',
        productId: true,
        portfolioId: true,
        exchange: true,
        quotationType: false,
        orderSide: true,
        agreementNumber: false,
        repurchaseDays: true,
        repoRate: true,
        firstSettlemenDate: true,
        counterParty: true,
        counterPartyCode: true,
        counterPartyper: true,
        addPledge: true,
        editPledge: true,
        deletePledge: true,
        position: true,
      },
      {
        value: '9',
        title: '协议回购换券申报确认',
        productId: true,
        portfolioId: true,
        exchange: true,
        quotationType: false,
        orderSide: true,
        agreementNumber: false,
        repurchaseDays: true,
        repoRate: true,
        firstSettlemenDate: true,
        counterParty: true,
        counterPartyCode: true,
        counterPartyper: true,
        addPledge: true,
        editPledge: false,
        deletePledge: true,
        position: true,
      },
      {
        value: '10',
        title: '协议回购提前终止申报确认',
        productId: true,
        portfolioId: true,
        exchange: true,
        quotationType: false,
        orderSide: true,
        agreementNumber: false,
        repurchaseDays: true,
        repoRate: true,
        firstSettlemenDate: true,
        counterParty: true,
        counterPartyCode: true,
        counterPartyper: true,
        addPledge: true,
        editPledge: true,
        deletePledge: true,
        position: true,
      },
    ],

    // 深交所报价类型
    shenzhenExchange: [],
  },

  // 资产类别对应关系
  assetType: [
    { key: '0', title: '股票' },
    { key: '1', title: '债券' },
    { key: '2', title: '基金' },
    { key: '3', title: '多资产' },
  ],

  // 是否select下拉
  booleanList: [
    { value: '0', title: '是' },
    { value: '1', title: '否' },
  ],

  // 交易所协议式回购委托方向
  orderSide: [
    { value: '2', title: '融资回购' },
    { value: '1', title: '融券回购' },
  ],
  // 债券协商指令 结算方式
  settleTypeList: [
    { title: '多边净额', value: '103' },
    { title: '逐笔全额', value: '104' },
  ],

  // 持仓类型
  // 业务类型以及对应的交易方向定义在src\comps\business\tradingDirect\config.js
  /*
    怎么区分应该用业务类型还是用持仓类型?
    业务类型用于下达指令，需要区分交易方向；
    持仓类型用于查询标的，无交易方向的概念，比如在证券代码中，后台返会的类型为持仓类型
  */
  // 章老师发的后端数据：
  // 证券类型\r\n0-债券\r\n1-股票\r\n2-基金 3-银行间质押式融资回购 4-银行间质押式融券回购 5-交易所融资回购，6-交易所质押式融券回购, 7-理财直融，8-存款，9-ETF,11-理财,12-非标,13-协议式正回购,14-交易所协议式融券回购
  // gp,zq,jj,etf,lczr,fb,jyshg,yhjhg,xyshg,ck
  // 后台之前有些地方用的是value，有些地方用的是code，所以这边两类都定义了，但是之后，我们都用value
  holdType: [
    { value: '0', code: 'zq', title: '债券' },
    { value: '1', code: 'gp', title: '股票' }, // 也标识港股，通过hkType区分港股和其他指令；表示【持仓类型】为“证券资产”、交易属性为“普通”的股票
    { value: '2', code: 'jj', title: '场外基金' },
    { value: '3', code: 'yhjhg', title: '银行间质押式融资回购' },
    { value: '4', code: 'yhjhg', title: '银行间质押式融券回购' },
    { value: '5', code: 'jyshg', title: '交易所质押式融资回购' },
    { value: '6', code: 'jyshg', title: '交易所质押式融券回购' },
    { value: '7', code: 'lczr', title: '非标（理财直融）' },
    { value: '8', code: 'ck', title: '存款' },
    { value: '9', code: 'etf', title: '场内（ETF）基金' },
    { value: '11', code: '', title: '理财' },
    { value: '12', code: 'fb', title: '非标（非理财直融）' },
    { value: '13', code: 'xyshg', title: '交易所协议式融资回购' },
    { value: '14', code: 'xyshg', title: '交易所协议式融券回购' },
    { value: '16', code: '', title: '债券借贷融入' },
    { value: '17', code: '', title: '债券借贷融出' },
    { value: '19', code: '', title: '港股通' }, // 翻译持仓管理的证券类型
    { value: '20', code: '', title: '资产管理计划' },
    { value: '21', code: '', title: '委外投资' },
    { value: '23', code: '', title: '股指期货' }, // 交易属性为“多头”
    { value: '24', code: '', title: '股指期货' }, // 交易属性为“空头”
    { value: '26', code: '', title: '商品期货' }, // 交易属性为“多头”
    { value: '27', code: '', title: '商品期货' }, // 交易属性为“空头”
    { value: '28', code: '', title: '期权' }, // 交易属性为“多头”
    { value: '29', code: '', title: '期权' }, // 交易属性为“空头”
    { value: '30', code: '', title: '国债期货' }, // 交易属性为“空头”
    { value: '31', code: '', title: '国债期货' }, // 交易属性为“多头”
    { value: '32', code: 'yhjhg', title: '银行间买断式融资回购' },
    { value: '33', code: 'yhjhg', title: '银行间买断式融券回购' },
    { value: '101', code: 'gpzqzc', title: '信用股票' }, // 表示【持仓类型】为“证券资产”、交易属性为“信用”的股票融资
    { value: '201', code: 'gpzqfz', title: '股票负债资产' }, // 表示【持仓类型】为“证券负债”股票融券资产
    { value: '109', code: 'etfzqzc', title: '场内（ETF）基金' }, // 表示【持仓类型】为“证券资产”、交易属性为“信用”的ETF基金融资
    { value: '209', code: 'etfzqfz', title: '场内（ETF）基金' }, // 表示【持仓类型】为“证券负债”ETF基金融券资产
  ],
  holdTypeTree: [
    { value: '0', code: 'zq', title: '债券' },
    { value: '1;101;201', code: 'gp', title: '股票' }, // 同时查询出普通股票和股票融资融券资产
    {
      value: '3;4;5;6;13;14;32;33',
      code: 'hg',
      title: '回购',
      children: [
        { value: '3', code: 'yhjhg', title: '银行间质押式融资回购' },
        { value: '4', code: 'yhjhg', title: '银行间质押式融券回购' },
        { value: '5', code: 'jyshg', title: '交易所质押式融资回购' },
        { value: '6', code: 'jyshg', title: '交易所质押式融券回购' },
        { value: '13', code: 'xyshg', title: '交易所协议式融资回购' },
        { value: '14', code: 'xyshg', title: '交易所协议式融券回购' },
        { value: '32', code: 'yhjhg', title: '银行间买断式融资回购' },
        { value: '33', code: 'yhjhg', title: '银行间买断式融券回购' },
      ],
    },
    {
      value: '9;109;209;2',
      code: 'jj',
      title: '基金',
      children: [
        { value: '9;109;209', code: 'etf', title: '场内（ETF）基金' }, // 同时查询出普通ETF和ETF融资融券资产
        { value: '2', code: 'jj', title: '场外基金' },
      ],
    },
    { value: '8', code: 'ck', title: '存款' },
    {
      value: '7;12',
      code: 'fb',
      title: '非标',
      children: [
        { value: '7', code: 'lczr', title: '非标（理财直融）' },
        { value: '12', code: 'fb', title: '非标（非理财直融）' },
      ],
    },
    {
      value: '16;17',
      code: '',
      title: '债券借贷',
      children: [
        { value: '16', code: '', title: '债券借贷融入' },
        { value: '17', code: '', title: '债券借贷融出' },
      ],
    },
    { value: '20', code: '', title: '资产管理计划' },
    { value: '21', code: '', title: '委外投资' },
    {
      value: '23;26;30',
      code: '',
      title: '期货',
      children: [
        { value: '23', code: '', title: '股指期货' },
        { value: '26', code: '', title: '商品期货' },
        { value: '30', code: '', title: '国债期货' },
      ],
    },
    { value: '28', code: '', title: '期权' },
  ],
};

export default dictionaryConfig;
